//
// Created by shirley on 2024/12/27.
//

#ifndef PICKINGSPOTS_H
#define PICKINGSPOTS_H
#include<iostream>
#include<vector>
#include <Source_CPgrid/mesh.hpp>

using namespace std;
class PickingSpots {
    private:
        //0-1
        double CoarseFactor;
        double Min_Rate = 0.1;
        string type;
        vector<int> Average_picking(const size_t& size) const;
        vector<int> Average_picking(finiteGrid& grid, int index = 0, string mode = "row") const;
        vector<int> Average_picking(const vector<int>& indexs) const;
        vector<vector<int>> sampleGrid(int start_r, int rows, int start_c, int cols, int layers = 0, bool flag = false) const;

    public:
        PickingSpots(): CoarseFactor(CoarseFactor),type("Average_picking") {}
        PickingSpots(double CoarseFactor = 1.0): CoarseFactor(CoarseFactor),type("Average_picking") {}
        PickingSpots(string type = "XXX"): CoarseFactor(1.0), type(type) {}

        void setCoarseFactor(double CoarseFactor);
        void setMin_Rate(double rate);

        vector<int> Picking(const size_t& size);
        vector<int> Picking(finiteGrid& grid, int index = 0, string mode = "row");
        vector<int> Picking(const vector<int>& indexs);

};



#endif //PICKINGSPOTS_H
